package com.gy.api.mobile.app;

import com.github.pagehelper.PageInfo;
import com.gy.api.base.ApiIndex;
import com.gy.api.base.IDEntity;
import com.gy.api.base.R;
import com.gy.api.base.RestPage;
import com.gy.api.pc.clap.domain.vo.*;
import com.gy.api.pc.clap.service.IAssociationClapCulvertService;
import com.gy.api.pc.movie.domain.vo.FilmPermitInfoVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.rmi.ServerException;
import java.util.List;


@RestController
@RequestMapping("/app/association/clap/culvert")
@Api( tags = ApiIndex.H5_IndexController)
public class AppAssociationClapCulvertIndexController {

    @Autowired
    IAssociationClapCulvertService associationClapCulvertService;

    @GetMapping("/notice/page")
    @ApiOperation(value = "协拍涵公示列表")
    public R<RestPage<PageCulvertVo>> pagePublicityCulvert(@ModelAttribute PageCulvertDto searchVO) {
        List<PageCulvertVo> list = associationClapCulvertService.pageCulvert(searchVO);
        RestPage restPage = new RestPage( new PageInfo(list),list);
        return new R(restPage);
    }
//
//    @GetMapping("/notice/detail")
//    @ApiOperation(value = "协拍涵公示详情")
//    public R<CulvertNoticeDetailVo> noticeDetail(@ApiParam(value = "协拍涵ID", required = true)@RequestParam Long id) {
//        CulvertNoticeDetailVo vo = associationClapCulvertService.noticeDetail(id);
//        return AjaxResult.success(vo);
//    }

    @GetMapping("/notice/detail")
    @ApiOperation(value = "协拍涵公示详情")
    public R<CulvertDetailVO> getApprovalDetail(@RequestParam String id) {
        CulvertDetailVO culvertVo = associationClapCulvertService.getH5ApprovalDetail(id);
        return new R(culvertVo);
    }



}

